package com.yyd.designmodel.responsibilitychain.impl;

import com.yyd.designmodel.responsibilitychain.FilterChain;
import com.yyd.designmodel.responsibilitychain.Request;
import com.yyd.designmodel.responsibilitychain.Response;

public class Main {

    /**
     * @Description：[  ]
     * @PackageName：[com.yyd.designmodel.responsibilitychain.impl.Main.java]
     * @CreateDate：[2015-2-2  上午10:18:13]
     * @Author：[yuyidi]
     *
     * @param args
     */
    public static void main(String[] args) {
          String message  = "敏感词汇，重庆，<script> 躲猫猫:)";
          Request request = new Request();
          request.setRequestStr(message);
          Response response = new Response();
          response.setResponseStr("response");
          
          FilterChain fc = new FilterChain();
          fc.addFilter(new HTMLFilter()).addFilter(new SesitiveFilter());
          
          FilterChain fc2 = new FilterChain();
          fc2.addFilter(new FaceFilter());
          fc.addFilter(fc2);
          fc.doFilter(request, response, fc);
          System.out.println("request = "+request.getRequestStr());
          System.out.println("response = "+response.getResponseStr());
    }

}
